:root {
  /* 亮色主题 */
  --bg-color: #f5f5f5;
  --card-bg-color: white;
  --text-color: #333;
  --border-color: #ddd;
  --hover-bg-color: #f9f9f9;
  --input-border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --empty-text-color: #999;
}

body.dark-theme {
  --bg-color: #121212;
  --card-bg-color: #1e1e1e;
  --text-color: #e0e0e0;
  --border-color: #333;
  --hover-bg-color: #2d2d2d;
  --input-border-color: #444;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --empty-text-color: #777;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
}

/* Flex容器 */
.flex容器 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.固定顶部 {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  background-color: var(--card-bg-color); /* 再次测试热重载 */
  padding: 20px; /* 热重载测试 - 修改2 */
  box-shadow: 0 2px 10px var(--shadow-color);
  z-index: 100;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.内容区域 {
  flex: 1;
  margin: 0;
  padding: 6px 0;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* 条目区域 */
.条目区域 {
  flex: 1;
  overflow: hidden;
}

h1 {
  text-align: center;
  color: var(--text-color);
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

h1:hover {
  opacity: 0.8;
}

.输入区域 {
  display: flex;
  gap: 10px;
}

#id_输入框 {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--input-border-color);
  border-radius: 4px;
  outline: none;
  background-color: var(--card-bg-color);
  color: var(--text-color);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#id_输入框:focus {
  border-color: #4CAF50;
}

#id_输入框::placeholder {
  color: var(--empty-text-color);
}

#id_保存按钮 {
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
  }

#id_保存按钮:hover {
  background-color: #45a049;
}

.列表 {
  overflow-y: auto;
  height: 100%;
}

.条目 {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.序号 {
  color: var(--empty-text-color);
  font-size: 14px;
  margin-right: 8px;
  font-weight: 500;
  min-width: 24px;
  text-align: right;
}

.条目:hover {
  background-color: var(--hover-bg-color);
}

.删除按钮 {
    background-color: #e0e0e0;
    color: #d32f2f;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 16px;
    transition: background-color 0.3s ease;
  }

body.dark-theme .删除按钮 {
    background-color: #2d2d2d;
    color: #ff5252;
  }

.删除按钮:hover {
  background-color: #d32f2f;
  color: white;
}

body.dark-theme .删除按钮:hover {
  background-color: #ff5252;
  color: white;
}

.内容 {
  flex: 1;
  word-wrap: break-word;
  white-space: pre-wrap;
  color: var(--text-color);
}

.复制按钮 {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
  }

body.dark-theme .复制按钮 {
    background-color: #1976D2;
    color: white;
  }

.复制按钮:hover {
  background-color: #1976D2;
}

/* 链接区域样式 */
.链接区域 {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 10px;
  text-align: center;
}

.链接区域 a {
  color: var(--text-color);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.链接区域 a:hover {
  background-color: var(--hover-bg-color);
  text-decoration: underline;
}

.空提示 {
  text-align: center;
  color: var(--empty-text-color);
  padding: 40px;
}

@media (max-width: 600px) {
  .固定顶部 {
    padding: 15px;
  }
  
  .内容区域 {
    margin-top: 120px; /* 为移动设备添加适当的上边距，避免内容被固定顶部遮挡 */
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .输入区域 {
    flex-direction: column;
  }
  
  #id_保存按钮 {
    width: 100%;
    font-size: 20px;
  }
  
  .条目 {
    padding: 8px;
  }
}